home *** CD-ROM | disk | FTP | other *** search
/ TPUG - Toronto PET Users Group / TPUG Users Group CD / TPUG Users Group CD.iso / CRS / crs58.d81 / g128sym.prg (.txt) < prev    next >
GEOS ConVerT  |  2009-10-10  |  5KB  |  135 lines

  1. geos128Sym
  2. PRG formatted GEOS file V1.0
  3. NX-1000 Rainbow
  4. OP V2.0 or higher
  5. BLASTER'S CONVERTER V2.5
  6. GEOS128SYM
  7. Text  Scrap
  8. Write Image V2.1
  9. geoWrite    V1.1
  10. (New equates, variables and constants - see Transactor 9:4
  11. with VDC colour values
  12. ; New Equates, Variables and Constants (Geos128Sym)
  13. AccessCache    = $c2ef
  14. ColorCard    = $c2f8
  15. ColorRectangle    = $c2fb
  16. DoBOp    = $c2ec
  17. HideOnlyMouse    = $c2f2
  18. JmpIndX    = $9d80
  19. MoveBData    = $c2e3
  20. NormalizeX    = $c2e0
  21. SetColorMode    = $c2f5
  22. SetMsePic    = $c2da
  23. SetNewMode    = $c2dd
  24. SwapBData    = $c2e6
  25. TempHideMouse    = $c2d7
  26. VerifyBData    = $c2e9
  27. graphMode    = $003f    ;bit 7 set = 80 column mode
  28. scr80Polar    = $88bc    ;copy of VDC reg 24
  29. scr80Colors    = $88bd    ;copy of VDC reg 26
  30. keyreg    = $d02f
  31. clkreg    = $d030
  32. mmu    = $d500
  33. VDC    = $d600
  34. MOUSEBASE    = $fd00
  35. ENDMOUSE    = $fe80
  36. config    = $ff00
  37. c128flag= $c013;bit 7 set if on 128
  38. ADD1_W    = $2000
  39. ADD1_B    = $20
  40. ARROW    = 0    ;pass this to SetMsePic
  41. CIOIN    = $7e
  42. CKRNLBASIOIN    = $40
  43. CKRNLIOIN    = $4e
  44. CRAM64K    = $7f
  45. DOUBLE_W    = $8000
  46. DOUBLE_B    = $80
  47. GR_40    = 0    ;use these two to test
  48. GR_80    = $80    ;graphMode
  49. INCOMPATIBLE    = 14    ;new disk error
  50. INPUT128    = 15    ;new input device
  51. KEYHELP    = 25
  52. KEYALT    = 26
  53. KEYESC    = 27
  54. KEYNOSCRL     = 7
  55. KEYENTER    = 11
  56. OFF128FLAGS    = 96    ;offset into header block
  57. SCREENBYTEWIDTH    = 80
  58. SCREENPIXELWIDTH    = 640
  59. ;VDC Colours
  60. vdcBlack     = 0
  61. vdcDkGray     = 1;light black
  62. vdcDkBlue     = 2
  63. vdcLtBlue     = 3
  64. vdcDkGreen     = 4
  65. vdcLtGreen     = 5
  66. vdcDkCyan     = 6
  67. vdcLtCyan     = 7
  68. vdcDkRed     = 8
  69. vdcLtRed     = 9
  70. vdcDkPurple     = 10
  71. vdcLtPurple     = 11
  72. vdcDkYellow     = 12
  73. vdcLtYellow     = 13
  74. vdcLtGray     = 14;dark white
  75. vdcWhite     = 15
  76. Constants (Geos128Sym)
  77. AccessCache    = $c2ef
  78. ColorCard    = $c2f8
  79. ColorRectangle    = $c2fb
  80. DoBOp    = $c2ec
  81. HideOnlyMouse    = $c2f2
  82. ; some sample code followed by some info from Rob N.  Thanx Rob  : )
  83.     .if     Pass1
  84.     .include     geosSym
  85.     .include     geos128Sym
  86.     .endif
  87.     .psect
  88. BeginHere:      LoadB     dispBufferOn,# (ST_WR_FORE | ST_WR_BACK)
  89.     jsr     NewDisk
  90.     jsr     MouseUp
  91.     lda     #2
  92.     jsr     SetPattern
  93.     jsr     i_Rectangle; clear standard screen
  94.     .byte     0,199
  95.     .word     0,639
  96.     lda     #1
  97.     jsr     SetColorMode; set to 640x176 mode (16k VDC ram)
  98.     jsr     ClrScreen
  99.     LoadW     r0,IconTable
  100.     jsr     DoIcons         ;set up Icons
  101.     LoadW     r0,MenuTable
  102.     lda     #1         ;MENU POS/MOUSE
  103.     jsr     DoMenu
  104. DoExit:      jsr     DoPreviousMenu
  105. DoQuit:      jmp     EnterDeskTop
  106. ClrScreen:      LoadB    r2L,0; clear VDC screen memory
  107.     LoadB     r2H,175; bottom is 175 for 16k VDC, 199 for 64k VDC
  108.     LoadW     r3,0
  109.     LoadW     r4,639
  110.     lda     #vdcLtGray
  111.     jsr     ColorRectangle
  112. IconTable:      .byte     1,0,0,0,0,0,0,0,0,0,0,0         ; one dummy Icon
  113. Endcode:
  114. SUBJ: 80 column colour                 FROM: RobertN4    01/01/91   S#: 824650  
  115. There are three routines of interest.  The first is SetColorMode at $c2f5.  This is used to setup the color card size (i.e. 8x8, 8x4 etc pixels).  You pass the option in register A.  options are:
  116.    A = 0 no color, 16K bitmap (this is called during booting and rebooting).
  117.    A = 1 color, 16K VDC, reduced screen size.  This changes the screen to 17 character lines to squeeze the attribute data into the last bit of the 16K.
  118.    A = 2 color, 8x8 cell size, 64K VDC.  Back to a 20 character line screen, but needs a 64K VDC since the attribute data is stored at $4000.
  119.    A = 3, color, 8x4 cells size, 64K VDC.
  120.    A = 4, color, 8x2 cell size, 64K VDC.
  121.   Then to draw, you have two routines.  The first is ColorRectangle ($c2fb).  You pass the following:
  122.      r2l ($06) = starting Y
  123.      r2H ($07) = ending Y
  124.      r3  ($08/9) = starting X word
  125.      r4  ($0a/b) = ending X word
  126.      A   = colour
  127.   This will fill a rectangle with the required color.  This routine works both in 40 and 80 columns,  but I have not checked whether or not doubling bits work on the X values (I assume they do like all 40/80 column routines). 
  128.   This uses the other subroutine, ColorCard (at $c2f8).  You pass this the following:
  129.    r3 ($08/9) = x location of card start (the routine adjusts to the closest 8 bit location, so you don't have to be exactly on the start of a card)
  130.    r11L ($18) = y location of card
  131.    A  = color to set or color required
  132.    C (carry bit).  If set, the put color into screeen.  If clear then put current screen color in A.
  133.   I have just looked and it does seem that doubling bits are taken into account.
  134.   Rob Norton
  135.